Sub ins_blocco(blocco, x, y, TAG0, TAG1, TAG2, _
                             TAG3, TAG4, TAG5, _
                             TAG6, TAG7, TAG8, TAG9, _
                             Valore0, Valore1, Valore2, Valore3, Valore4, _
                             Valore5, Valore6, Valore7, Valore8, Valore9)

Dim blockObj As AcadBlockReference
Dim newObjs As AcadEntity
Dim Pos(0 To 2) As Variant
Dim Coord(0 To 2) As Double, insertionPnt(0 To 2) As Double

Dim tag(9) As String, Valore(9) As String
tag(0) = TAG0: tag(1) = TAG1: tag(2) = TAG2: tag(3) = TAG3: tag(4) = TAG4:
tag(5) = TAG5: tag(6) = TAG6: tag(7) = TAG7: tag(8) = TAG8: tag(9) = TAG9:
Valore(0) = Valore0: Valore(1) = Valore1: Valore(2) = Valore2: Valore(3) = Valore3:
Valore(4) = Valore4: Valore(5) = Valore5: Valore(6) = Valore6: Valore(7) = Valore7:
Valore(8) = Valore8: Valore(9) = Valore9:

insertionPnt(0) = x: insertionPnt(1) = y: insertionPnt(2) = 0
'Inserisco il blocco e aggiorni gli attributi
Set blockObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, _
    "M:\LIBSIMA\USER\" & blocco & ".DWG", 1, 1, 1, 0)

' Edito il blocco inserito
Set newObjs = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)
With newObjs
    If .HasAttributes Then 'verifico se ha attributi
        array1 = .GetAttributes ' carico tutti gli attributi su una matrice
        For Count = LBound(array1) To UBound(array1) '
            If StrComp(array1(Count).EntityName, "AcDbAttribute", 1) = 0 Then
                NomeTAG = array1(Count).TagString ' TAG attributo
                For I = 0 To 9
                    If NomeTAG = tag(I) Then
                        'Modifico il Testo attributo
                        If Valore(I) <> "" Then array1(Count).textString = Valore(I)
                        .Update
                        If blocco <> "0401101" And blocco <> "071501A" Then
                            If array1(Count).TagString = "SIGLA" Then
                                If Len(array1(Count).textString) > 5 Then
                                    array1(Count).Rotation = (90 / 180) * 3.14159
                                    array1(Count).Update
                                    Pos(0) = array1(Count).insertionPoint
                                    Coord(0) = Pos(0)(0) + 4: Coord(1) = Pos(0)(1) - 8: _
                                    Coord(2) = Pos(0)(2):
                                    array1(Count).insertionPoint = Coord
                                End If
                            End If
                        End If
                        If tag(I + 1) = "" Then Exit For
                    End If
                Next I
            End If
        Next Count
    End If
End With

End Sub